var newsTable;
function getForumRecordList() {
	drawTableHeader();//随着查询按钮重画头部图表
	drawList(2);
    if (typeof newsTable !== 'undefined') {
        newsTable.fnPageChange('first');
        return;
    }
    var i = 1;
    newsTable = $("#forumRecordList").DataTable({
        "sAjaxSource": _path + "/forumRecord/queryByPage",          
        "fnServerParams": function (aoData) {
            aoData.push(
                {"name": "user_ip" ,"value":$("#user_ip").val()},
                {"name": "user_account" ,"value":$("#user_account").val()},
                { "name": "forum_type", "value": $("#forum_type").val() },
                { "name": "fromDate", "value": $("#fromDate").val() },
                { "name": "toDate", "value": $("#toDate").val() },
                {"name": "forum_title" ,"value":$("#forum_title").val()}
            );
        },
        "sServerMethod": "POST",
        "sAjaxDataProp": "dataList",
        "fnCreatedRow": function () {
            i++;
        },
        "fnPreDrawCallback": function () {
            i = 1;
        },
        "aoColumns": [
            { "sTitle": "编号", "mData":"id", "sWidth": "2%"},    
            { "sTitle": "IP地址", "mData": "user_ip", "sWidth": "10%" },
            { "sTitle": "论坛类型", "mData": "forum_type", "sWidth": "10%" },
            { "sTitle": "访问账户", "mData": "user_account", "sWidth": "10%" },
            { "sTitle": "论坛简介", "mData": "forum_refer", "sWidth": "10%" },
            { "sTitle": "论坛组", "mData": "forum_group", "sWidth": "10%" },
            { "sTitle": "论坛名称", "mData": "forum_title", "sWidth": "10%" },
            { "sTitle": "论坛内容", "mData": "forum_content", "sWidth": "10%" },
            { "sTitle": "添加时间", "mData": "createTime", "sWidth": "10%" }
        ]
    });
}
